package com;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.client.RestTemplate;

/**
 * @author fengbenpeng
 * @description: TODO
 * @date 2022/3/10 17:44
 */
@SpringBootApplication
@MapperScan("com.group4.order.mapper")
//openfen注解
@EnableFeignClients
//在配置类上添加 @ComponentScan 注解。该注解默认会扫描该类所在的包下所有的配置类，
// 相当于之前的 <context:component-scan>
@ComponentScan(basePackages = {"com.group4"})
@EnableDiscoveryClient
public class ServiceOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServiceOrderApplication.class, args);
    }

////    配置nacos,下面这个可以有也可以没有
//    @LoadBalanced
//    @Bean
//    public RestTemplate restTemplate() {
//        return new RestTemplate();
//    }
    //RequestParam

}
